package com.itheima.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.common.R;
import com.itheima.entity.Employee;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 员工信息 服务类
 * </p>
 *
 * @author Guoyh
 * @since 2022-08-19
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 根据用户名查询该用户是否存在
     *
     * @param employee
     * @return
     */
    Employee selectOne(Employee employee);


    void saveEmployee(HttpServletRequest request, Employee employee);

    /**
     * 根据页码和显示数目,以及姓名查询用户
     *
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    Page selectByPageAndCondition(int page, int pageSize, String name);


    void update(HttpServletRequest request, Employee employee);

    Employee getById(Long id);

}
